Ticket #260 (new defect)

Opened 15 months ago

the type checker cannot handle a simple list comprehension

Reported by: steve.heller Owned by: EricAllen
Priority: major Milestone:
Component: interpreter Version:
Keywords: type-checking comprehension Cc:

Description

A simple list comprehension fails type-checking.

component tryit (* trying out stuff *)
import List.{...}
export Executable

generators = <| a | a<-3:10 |>

run(args:String...) = do end
end tryit

And here's the error:

-*- mode: compilation; default-directory: "~/programs/fortress/" -*-
Compilation started at Mon Sep 15 16:24:30

~/PFC/bin/fortress typecheck tryit.fss
Guessing FORTRESS_HOME=/Users/steve/PFC
:0:0-/Users/steve/programs/fortress/tryit.fss:18:30: Applicable overloading of function __generate could not be found for argument type ((FortressLibrary.FullRange[\FortressBuiltin.IntLiteral[\\],BoolConstant at /Users/steve/PFC/Library/FortressLibrary.fsi:1946.57\],FortressBuiltin.Object[\\],(AND{FortressBuiltin.NN32[\\],FortressLibrary.String[\\],FortressLibrary.ZZ32[\\]})->AND{FortressBuiltin.NN32[\\],FortressLibrary.String[\\],Any,Any,FortressLibrary.ZZ32[\\]}))
:0:0-/Users/steve/programs/fortress/tryit.fss:18:30: Applicable overloading of function __bigOperator could not be found for argument type ((FortressLibrary.Comprehension[\FortressBuiltin.Object[\\],List.List[\FortressBuiltin.Object[\\]\],List.List[\FortressBuiltin.Object[\\]\],List.List[\FortressBuiltin.Object[\\]\]\],(FortressBuiltin.Object[\\], AND{FortressLibrary.Integral[\Any\],FortressBuiltin.NN32[\\],FortressLibrary.String[\\],FortressLibrary.ZZ32[\\],FortressLibrary.MultiplicativeRing[\Any\]})->BottomType))
File tryit.fss compiled with 2 errors.

Compilation finished at Mon Sep 15 16:24:36
Note: See TracTickets for help on using tickets.