Skip to content

Commit

Permalink
migrate to Prelude operator
Browse files Browse the repository at this point in the history
  • Loading branch information
kbertalan committed Jun 9, 2024
1 parent 9bb761b commit 070087e
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 42 deletions.
9 changes: 0 additions & 9 deletions src/Go/AST/Combinators.idr
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ import public Data.List.Quantifiers
import public Go.AST
import public Go.Token

%hide Prelude.Ops.infixl.(|>)
%hide Prelude.(|>)

export
(|>) : a -> (a -> b) -> b
(|>) a fn = fn a

export infixl 5 |>

public export
interface Commentable a where
setComments : CommentGroup -> a -> a
Expand Down
3 changes: 0 additions & 3 deletions src/Idris2/Compiler/Go.idr
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ import Idris2.Compiler.Go.Support.Gen

import Libraries.Utils.Path

%hide Prelude.Ops.infixl.(|>)
%hide Prelude.(|>)

namespace GoExp

public export
Expand Down
3 changes: 0 additions & 3 deletions tests/tour/basics14/Basics14.idr
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ module Basics14
import Go.AST.Printer as Go
import Go.AST.Combinators as Go

%hide Prelude.Ops.infixl.(|>)
%hide Prelude.(|>)

main : IO ()
main = do
let src = file "type-conversions.go"
Expand Down
3 changes: 0 additions & 3 deletions tests/tour/basics16/Basics16.idr
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ module Basics16
import Go.AST.Printer as Go
import Go.AST.Combinators as Go

%hide Prelude.Ops.infixl.(|>)
%hide Prelude.(|>)

main : IO ()
main = do
let src = file "numeric-constants.go"
Expand Down
3 changes: 0 additions & 3 deletions tests/tour/flowcontrol7/FlowControl7.idr
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ module FlowControl7
import Go.AST.Printer as Go
import Go.AST.Combinators as Go

%hide Prelude.Ops.infixl.(|>)
%hide Prelude.(|>)

main : IO ()
main = do
let src = file "if-and-else.go"
Expand Down
3 changes: 0 additions & 3 deletions tests/tour/flowcontrol9/FlowControl9.idr
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ module FlowControl9
import Go.AST.Printer as Go
import Go.AST.Combinators as Go

%hide Prelude.Ops.infixl.(|>)
%hide Prelude.(|>)

main : IO ()
main = do
let src = file "switch.go"
Expand Down
3 changes: 0 additions & 3 deletions tests/tour/moretypes1/MoreTypes1.idr
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ module MoreTypes1
import Go.AST.Printer as Go
import Go.AST.Combinators as Go

%hide Prelude.Ops.infixl.(|>)
%hide Prelude.(|>)

main : IO ()
main = do
let src = file "pointers.go"
Expand Down
3 changes: 0 additions & 3 deletions tests/tour/moretypes11/MoreTypes11.idr
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ module MoreTypes11
import Go.AST.Printer as Go
import Go.AST.Combinators as Go

%hide Prelude.Ops.infixl.(|>)
%hide Prelude.(|>)

main : IO ()
main = do
let src = file "slice-len-cap.go"
Expand Down
3 changes: 0 additions & 3 deletions tests/tour/moretypes14/MoreTypes14.idr
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ module MoreTypes14
import Go.AST.Printer as Go
import Go.AST.Combinators as Go

%hide Prelude.Ops.infixl.(|>)
%hide Prelude.(|>)

main : IO ()
main = do
let src = file "slices-of-slice.go"
Expand Down
3 changes: 0 additions & 3 deletions tests/tour/moretypes15/MoreTypes15.idr
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ module MoreTypes15
import Go.AST.Printer as Go
import Go.AST.Combinators as Go

%hide Prelude.Ops.infixl.(|>)
%hide Prelude.(|>)

main : IO ()
main = do
let src = file "append.go"
Expand Down
3 changes: 0 additions & 3 deletions tests/tour/moretypes17/MoreTypes17.idr
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ module MoreTypes17
import Go.AST.Printer as Go
import Go.AST.Combinators as Go

%hide Prelude.Ops.infixl.(|>)
%hide Prelude.(|>)

main : IO ()
main = do
let src = file "range-continued.go"
Expand Down
3 changes: 0 additions & 3 deletions tests/tour/moretypes5/MoreTypes5.idr
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ module MoreTypes5
import Go.AST.Printer as Go
import Go.AST.Combinators as Go

%hide Prelude.Ops.infixl.(|>)
%hide Prelude.(|>)

main : IO ()
main = do
let src = file "struct-literals.go"
Expand Down

0 comments on commit 070087e

Please sign in to comment.