|
|
type inference
<programming> An algorithm for ascribing types to
expressions in some language, based on the types of the
constants of the language and a set of type inference rules
such as
f :: A -> B, x :: A
--------------------- (App)
f x :: B
This rule, called "App" for application, says that if
expression f has type A -> B and expression x has type A then
we can deduce that expression (f x) has type B. The
expressions above the line are the premises and below, the
conclusion. An alternative notation often used is:
G |- x : A
where "|-" is the turnstile symbol (LaTeX \vdash) and G is a
type assignment for the free variables of expression x. The
above can be read "under assumptions G, expression x has type
A". (As in Haskell, we use a double "::" for type
declarations and a single ":" for the infix list constructor,
cons).
Given an expression
plus (head l) 1
we can label each subexpression with a type, using type
variables X, Y, etc. for unknown types:
(plus :: Int -> Int -> Int)
(((head :: [a] -> a) (l :: Y)) :: X)
(1 :: Int)
We then use unification on type variables to match the
partial application of plus to its first argument against
the App rule, yielding a type (Int -> Int) and a substitution
X = Int. Re-using App for the application to the second
argument gives an overall type Int and no further
substitutions. Similarly, matching App against the
application (head l) we get Y = [X]. We already know X = Int
so therefore Y = [Int].
This process is used both to infer types for expressions and
to check that any types given by the user are consistent.
See also generic type variable, principal type.
(1995-02-03)
Try this search on OneLook / Google
Nearby terms:
typed lambda-calculus « TypedProlog « typeface « type inference » type scheme » typo » typographical error
This article was derived from the Free Online Dictionary of Computers and is available under ther terms of the GNU Free Documentation License.
VIA VT6421L SATA Raid Controller PCI CardVIA VT6421L SATA Raid Controller PCI Card ** VIA VT6421L SATA Raid Controller PCI Card **This SATA Raid Controller PCI Card offers reliability to your PC desktop or servers using Serial ATA drives. It features the VIA VT6421L chipset and supports two Serial ATA drives and two UDMA/133 drives. The RAID functions are only supported on the SATA hard drives. It also supports hard drives larger than 137 GB, ATA Smart function support, is Plug and Play, and more!General Features:- VIA VT6421L chipset- PCI interface- Supports two SATA and two PATA hard disk drives- Up to 150 Mbps data transfer rate- Only SATA supports RAID- Supports ATA 133 high performance hard disk drives- Supports hard drives larger than 137 GB (48-bits LBA)- Supports ULtra DMA mode 6/5/4/6/2/1/0- Supports DMA mode 2/1/0- Supports PIO mode 4/3/2/1/0- Supports RAID 0, 1 0+1 and JBOD- Supports IDE Bus Mastering- 4 KB to 64 KB striping block size support- Supports bootable disk or disk array- ATA Smart function support- Mirroring automatic background rebuilds support- Plug and PLay- Event log for easy troubleshootingInternal connectors:- Two (2) SATA ports- One (1) IDE connectorRegulatory Approvals:- CERetail Package Includes:- VIA VT6421L SATA Raid Controller PCI Card- Manual- Driver and Utility CD- Serial ATA (SATA ) cable Compatibility/Requirements/Disclosures:** Requirements *** Windows 98/ME/2000/NT 4.0/XP* CD-ROM drive* Available PCI slot More ...
Icy Dock Bodyguard525 Multi-Function Transfer RackIcy Dock Bodyguard525 Multi-Function Transfer Rack ** Icy Dock Bodyguard 525 Multi-Function Transfer Rack **Keep your hard drive cool with the Icy Dock multifunction transfer rack! This rack allows you to quickly install your IDE, SATA and 68-pin SCSI drive with ease. The Icy Dock MB228 features a sliding front plane, fan speed adjuster, three monitored temperature gauges, alarm, cooling fan, and much more! General Features:- Plastic and Aluminum alloy- For standard 5.25-inch half-height expansion bay- Support 1 standard 1-inch height HDD- Two (2) 40 X 40 mm ball bearing cooling fan- Redundant internal cooling fan function- External fan speed control- Backlight LCD display - Sliding front plane- HDD cushion device- Quick installation HDD without screws- Three (3) temperature detectors- Internal fan fail & over-heat audio alarm and display- HUTR (HDD Usage Time Record) display- Master or Slave condition setting and displayHard Drive Support:- IDE- SCSI (68Pin)- Serial ATARegulatory Approvals:- CERetail Package Includes:- Multi function rack- Screw pack- User guideNotes:- Model: MB228MGF Compatibility/Requirements/Disclosures: ** Requirements *** Half height 5.25-inch drive bay* Available 4-pin molex power connector More ...
Galaxy of Mahjongg 2Galaxy of Mahjongg 2 Galaxy of MahJongg 2 is an updated assortment of five of our best MahJongg games all in one incredible collection! Solitaire MahJongg, RahJongg - The Curse of Ra, MahJongg Clicks, MahJongg Empire...and more! Windows 95/98/ME/2000/XP More ...
Sharp VGA 12.1-Inch Color TFT LQ12DX03Sharp VGA 12.1-Inch Color TFT LQ12DX03 ** Sharp VGA 12.1 Color TFT LQ12DX03 **General Features:- 12.1 LCD screen- TFT color VGA- Sharp Model# LQ12DX03 - 10 9/16 x 7 15/16 - NEW Brown BoxedNotes:- New More ...
IDE Removable Tray for External Drive EnclosureIDE Removable Tray for External Drive Enclosure ** IDE Removable Tray for External Drive Enclosure **This removable tray module is designed to fit a 3.5-inch IDE drive. It features a 40-pin IDE and 4-pin large Molex power connector. It comes with lockable design and easy to open lever handle.General Features:- Fits 3.5-inch IDE hard drive- 40-pin IDE and 4-pin large Molex power connector- Removable tray module- LED light indicators- Lockable design (keys not included)- Easy to open lever handlePackage Includes:- IDE Removable Tray for External Drive EnclosureNotes:- Can be used with U6-1 Series external case Compatibility/Requirements/Disclosures: ** Requirements *** External disk cabinet* 3.5-inch Serial ATA hard drive More ...
NEW P4 2.8GHz 256MB DDR 80GB CDRW AGPNEW P4 2.8GHz 256MB DDR 80GB CDRW AGP ** NEW P4 2.8GHz 256MB DDR 80GB CDRW AGP **This FAST system features an Intel Pentium 4 2.8GHz processor, an 80GB 7200RPM hard drive, 256MB DDR RAM, and sports a 52x32x52 CDRW drive. It also includes a high powered GeForce MX4000 64MB AGP Video Card for great graphics!General Features:- Intel Pentium 4 2.8GHz Processor- 256MB DDR Memory- 80GB 7200RPM IDE Hard Drive- 52X32X52 CDRW Drive- Nvidia GeForce MX4000 64MB AGP Video Card- AC97 Integrated Audio- 56K V.90 Data/Fax Modem- Integrated 10/100 Ethernet- Standard Size ATX Power SupplyMotherboard Features:- Intel845D (Northbridge) / Intel ICH2 (Southbridge) Chipsets- One (1) 4X AGP Slot (Occupied by AGP card)- Five (5) PCI slotsI/O Ports:- Two (2) PS/2 Ports, one for mouse, one for keyboard- One (1) Standard DB-15 VGA Connector- One (1) Standard 25-pin Parallel Port Connector- One (1) Standard 9-pin Serial Port Connector- Six (6) Standard USB 2.0 Ports (Two on front, four on rear)- One (1) Standard RJ-45 10/100 Ethernet Port- Line-in, Phone-out RJ-11 Jacks on PCI Modem- Line-in, Mic-in, Line-out 3.5mm mini-jacksPackage Includes:- Eureka P4 2.8GHz System- PS/2 Keyboard and Scroll Mouse- Driver Disc- Panda AntiVirus Software- FaxTalk Communicator Software- Adobe Reader- RJ-11 Phone Cable for Modem- Amplified Stereo Speakers - Asrock P4I45D Motherboard manual- U.S. Style Power CordCompatibility/Requirements/Disclosures:** Requirements *** Operating system (WinXP,2000,98,etc.)* VGA monitor* Power outlet More ...
|